package tankwar;

import java.awt.*;

public class BlastObj extends GameObject {
    static Image[] images=new Image[8];
    int explodeCount=0;
    static {
        for (int i = 0; i < 8; i++) {
            images[i]=Toolkit.getDefaultToolkit().getImage("images/blast/blast" +(i + 1)+".gif");
        }
    }

    public BlastObj(int x,int y) {
        this.x=x;
        this.y=y;
    }

    @Override
    public void paintSelf(Graphics g) {
        if(explodeCount<8) {
            g.drawImage(images[explodeCount],x,y,null);
            explodeCount++;
        }
    }

    @Override
    public Rectangle getRec() {
        return null;
    }
}
